<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>练习五</title>
</head>
<body>
    <script>
        var array = new Array(6);
        for (let i = 0; i < array.length; i++) {
            array[i] = Math.floor(Math.random()*100);
        }
        let sum = 0;
        for (let i = 0; i < array.length; i++) {
            sum += array[i];
        }
        console.log(sum);
    </script>
</body>
</html>